package com.example.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 *
 * </p>
 *
 * @author testjava
 * @since 2022-08-20
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName(value = "workplan")
@AllArgsConstructor
@NoArgsConstructor
public class WorkPlan implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "planId", type = IdType.AUTO)
    private Long planId;
    /*计划标题*/
    @TableField("planName")
    private String planName;
    /*用户id*/
    @TableField("uid")
    private Long uid;
    /*计划简要*/
    @TableField("description")
    private String description;
    /*计划内容*/
    @TableField("planContent")
    private String planContent;
    /*开始时间*/
    @TableField("startTime")
    private Date startTime;
    /*结束时间*/
    @TableField("endTime")
    private Date endTime;

    /*状态码 0：未完成；1：已完成；2：进行中；3：搁浅状态*/
    @TableField("status")
    private Integer status;

    /*用户*/
    @TableField(exist = false)
    private User user;

    @TableField(exist = false)
    private String startT;/*转化为String的开始时间*/

    @TableField(exist = false)
    private String endT;/*转化为String的结束时间*/



    public WorkPlan(String planName, Long uid, String description, String planContent, Date startTime, Date endTime, Integer status) {
        this.planName = planName;
        this.uid = uid;
        this.description = description;
        this.planContent = planContent;
        this.startTime = startTime;
        this.endTime = endTime;
        this.status = status;
    }

    public WorkPlan(Long planId, String planName, Long uid, String description, String planContent, Date startTime, Date endTime, Integer status) {
        this.planId = planId;
        this.planName = planName;
        this.uid = uid;
        this.description = description;
        this.planContent = planContent;
        this.startTime = startTime;
        this.endTime = endTime;
        this.status = status;
    }
}
